package com.gs.synedocket.dialog;

import android.content.Context;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import androidx.annotation.NonNull;

import com.gs.synedocket.R;


public class TermDialog extends BaseDialog {


    public TermDialog(@NonNull Context context) {
        super(context, R.style.custom_dialog);
    }

    @Override
    public void refreshView() {
    }

    @Override
    public void initView() {
        WebView webView = findViewById(R.id.webView);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setBuiltInZoomControls(false);
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl("file:///android_asset/term.html");
        findViewById(R.id.btn_back).setOnClickListener(v -> {
            webView.destroy();
            dismiss();
        });
    }

    @Override
    public int getLayoutId() {
        return R.layout.dialog_term;
    }

}
